import request from '@/service/request'
interface TableData {
  id: string
  pageNum: number
  pageSize: number
}

const preffix = '/msp-admin'

export const getLeftTableListApi = (params: any): Promise<IResponse> => {
  return request.get({ url: `${preffix}/pmsobj/queryList`, params })
}

export const getDetailApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: `${preffix}/pmsobj/detail`, data })
}

export const delTableListApi = (id: string | number): Promise<IResponse> => {
  return request.delete({ url: `${preffix}/pmsobj/deleteById`, id })
}

export const saveTableDataApi = (data: any): Promise<IResponse<TableData>> => {
  return request.post({ url: `${preffix}/pmsobj/saveOrUpdate`, data })
}
